<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGovernmentInfosTable extends Migration
{
    /**
     * Run the migrations.
     * 政务信息
     * @return void
     */
    public function up()
    {
        Schema::create('government_infos', function (Blueprint $table) {
            $table->bigIncrements('id')->comment('自增ID');
            
            $table->string('title', 300)->comment('政务标题');
            $table->string('content', 2000)->comment('政务内容');
            $table->unsignedBigInteger('publisher_uid')->comment('发布者uid')->index();

            $table->timestamps();
            $table->softDeletes();

            $table->engine = 'InnoDB';

        });
        DB::statement("alter table `government_infos` comment'政务信息表'");

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('government_infos');
    }
}
